package com.yunxi.service.dubboService.impl.activiti;

import com.sun.scenario.effect.Identity;
import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
import org.activiti.engine.task.IdentityLink;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class MutiGroupsListener implements TaskListener {
    public static final Logger LOGGER = LoggerFactory
            .getLogger(MutiGroupsListener.class);
    @Override
    public void notify(DelegateTask arg0) {
        Iterator<IdentityLink> list = arg0.getCandidates().iterator();
        //清0操作，如果t2会审步骤被驳回，回到t1，需要将通过数，总数重新清空
        //根据环节角色查询
        List<String> assigneeList = new ArrayList<String>();
        assigneeList.add("kermit");
        assigneeList.add("gonzo");
        arg0.setVariable("partyList",assigneeList);
    }
}